package com.bsoft.gol.hcs.enumcase;

/**
 * @author tongtp
 * @version v0.1
 * @package enumcase
 * @className PatientNumberTypeEnum
 * @description 患者号码类型
 * @create 2021-08-09 19:15
 **/
public enum PatientNumberTypeEnum {

	//患者号码类型：1 门诊号码 2 住院号码
	OUTPATIENT_NUMBER((byte) 1, "门诊号码"),
	INPATIENT_NUMBER((byte) 2, "住院号码");

	private final Byte type;

	private final String name;

	PatientNumberTypeEnum(Byte type, String name) {
		this.type = type;
		this.name = name;
	}

	public static PatientNumberTypeEnum getEnumByKey(Byte type) {
		for (PatientNumberTypeEnum temp : PatientNumberTypeEnum.values()) {
			if (temp.getType().equals(type)) {
				return temp;
			}
		}
		return null;
	}

	public Byte getType() {
		return type;
	}

	public String getName() {
		return name;
	}
}
